//
//  UIViewController+wswling.m
//  test
//
//  Created by WSWshallwe on 2017/2/14.
//  Copyright © 2017年 Lvyan. All rights reserved.
//

#import "UIViewController+wswling.h"

@implementation UIViewController (wswling)

+ (void)load {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        SEL systemSel = @selector(viewWillAppear:);
        SEL wswSel = @selector(wsw_viewWillAppear);
        Method m1 = class_getClassMethod([self class], systemSel);
        Method m2 = class_getInstanceMethod([self class], wswSel);
        BOOL isAdd = class_addMethod(self, systemSel, method_getImplementation(wswSel), method_getTypeEncoding(wswSel));
        
    });
}

@end
